package com.first.xiinn.dao.impl;

import java.util.HashMap;
import java.util.List;

import com.first.core.dao.impl.BaseDaoImpl;
import com.first.xiinn.dao.BookStatisticsDao;
import com.first.xiinn.model.BookStatistics;


@SuppressWarnings("unchecked")
public class BookStatisticsDaoImpl extends BaseDaoImpl<BookStatistics> implements BookStatisticsDao{
	public BookStatisticsDaoImpl() {
		super(BookStatistics.class);
	}
	
	/*
	 * (non-Javadoc)
	 * @see com.first.xiinn.dao.BookStatisticsDao#saveStatistics(com.first.xiinn.model.BookStatistics)
	 */
	@Override
	public BookStatistics saveStatistics(BookStatistics statistics) {
		return (BookStatistics) this.sqlMapClientTemplate.insert("addBookStatistics",statistics);
	}
	/*
	 * (non-Javadoc)
	 * @see com.first.xiinn.dao.BookStatisticsDao#getStatisticsQuery(java.util.HashMap)
	 */
	@Override
	public List getStatisticsQuery(HashMap map) {
		return (List) this.sqlMapClientTemplate.queryForList("getStatisticsQuery", map);
	}
}